﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;

namespace BarManager.Printer.Ticket.WCF
{
    [ServiceContract()]
    public interface IContract
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/PrintOrder")]
        void PrintOrder(TicketOrder ticketOrder);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/PrintKitchen")]
        void PrintKitchen(TicketOrder ticketKitchen);

    } 

    [Serializable]
    [DataContract()]
    public class TicketOrder
    {
        [DataMember()]
        public long OrdenId { get; set; }
        [DataMember()]
        public string Zona { get; set; }
        [DataMember()]
        public string Mesa { get; set; }
        [DataMember()]
        public string Mozo { get; set; }
        [DataMember()]
        public decimal TotalRegalado { get; set; }
        [DataMember()]
        public decimal TotalPagado { get; set; }
        [DataMember()]
        public decimal TotalPorPagar { get; set; }
        [DataMember()]
        public decimal Total { get; set; }
        [DataMember()]
        public decimal SubTotal { get; set; }
        [DataMember()]
        public List<Item> Detalle { get; set; }
    }

    [Serializable]
    [DataContract()]
    public class Item
    {
        [DataMember()]
        public int Cantidad { get; set; }
        [DataMember()]
        public int CantidadRegalo { get; set; }
        [DataMember()]
        public int CantidadPagado { get; set; }
        [DataMember()]
        public int CantidadPorPagar { get; set; }
        [DataMember()]
        public decimal PrecioUnitario { get; set; }
        [DataMember()]
        public string Descripcion { get; set; }
        [DataMember()]
        public decimal SubTotalRegalado { get; set; }
        [DataMember()]
        public decimal SubTotalPagado { get; set; }
        [DataMember()]
        public decimal SubTotalPorPagar { get; set; }
        [DataMember()]
        public decimal SubTotal { get; set; }
    }

   
}
